package collection;

import java.util.HashMap;
import java.util.HashSet;

import java.util.Map;
import java.util.Set;

/**
 * @Auther: 杨通通
 * @Date: 2024/11/21 23:04
 * @Description:
 */
public class set1 {
    public static void main(String[] args) {

        HashMap<String,String> m1 = new HashMap<>();
        m1.put("name","ytt");
        m1.put("address","山东");

        Set<Map.Entry<String, String>> entries = m1.entrySet();
        for (Map.Entry<String, String> entrie:
             entries) {
            System.out.println(entrie.getKey());
            System.out.println(entrie.getValue());
        }

    }
}